package com.example.demo3.controller;

import com.example.demo3.entity.Application;
import com.example.demo3.service.ApplicationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

//③控制器：只管输入输出，调用业务类
@RestController
public class ApplicationController {
    @Autowired
    ApplicationService applicationService;
    @RequestMapping(value = "/application", method = {RequestMethod.GET})
    public List<Application> selectList(){
        return applicationService.selectList();
    }
}
